function g=dfunc(x, y)
% It's Rosenbrock's gradient.
    g = zeros(2, 1);
    g(1) = 2.0 * (x - 1) + 400.0 * x .* (x.^2 - y);
    g(2) = 200.0 * (y - x.^2);
end